package com.suql.networktools.net.contract

import com.suql.networktools.bean.TResponse
import com.suql.networktools.bean.UserInfo
import com.suql.networktools.net.DataListener
import com.suql.networktools.net.IBModel
import com.suql.networktools.net.IBPresenter

/**
 * @ClassName: LoginContract
 * @Dscription: 登陆Contract
 * @Author: su qinglin
 * @Date: 2018/7/26 16:00
 */
interface LoginContract {

    interface IModel : IBModel {

        fun login(userName: String, password: String, listener: DataListener<TResponse<UserInfo>>)
    }

    interface IPresenter : IBPresenter {

        fun login(userName: String, password: String)
    }

    interface IView {

        fun loginSuccess(userInfo: UserInfo?, message: String?)

        fun loginFail(message: String?)
    }
}
